package com.micro.model;

import java.io.Serializable;

/**
 * 主题表
 * @author hu.qingyun
 * 2017年3月0日
 */
public class Subject implements Serializable{
	private String subjectId;
	private String pSubjectId;
	private String subjectLink;
	private String subjectTitle;
	private String subjectContent;
	private byte[] subjectContentByte;
	private String subjectCatName;
	private String userName;
	private String subjectTop;
	private int subjectLaud;
	private String subjectDate;
	private String modifyDate;
	private String modifyUserName;
	private String subjectState;
	private String flag;
	private String knowDingding;

	public String getSubjectId() {
		return subjectId;
	}

	public void setSubjectId(String subjectId) {
		this.subjectId = subjectId;
	}

	public String getpSubjectId() {
		return pSubjectId;
	}

	public void setpSubjectId(String pSubjectId) {
		this.pSubjectId = pSubjectId;
	}

	public String getSubjectTitle() {
		return subjectTitle;
	}

	public void setSubjectTitle(String subjectTitle) {
		this.subjectTitle = subjectTitle;
	}

	public String getSubjectContent() {
		return subjectContent;
	}

	public void setSubjectContent(String subjectContent) {
		this.subjectContent = subjectContent;
	}

	public String getSubjectCatName() {
		return subjectCatName;
	}

	public void setSubjectCatName(String subjectCatName) {
		this.subjectCatName = subjectCatName;
	}

	public String getUserName() {
		if (null == userName) {
			userName = "";
		}
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getSubjectTop() {
		return subjectTop;
	}

	public void setSubjectTop(String subjectTop) {
		this.subjectTop = subjectTop;
	}

	public int getSubjectLaud() {
		return subjectLaud;
	}

	public void setSubjectLaud(int subjectLaud) {
		this.subjectLaud = subjectLaud;
	}

	public String getSubjectDate() {
		return subjectDate;
	}

	public void setSubjectDate(String subjectDate) {
		this.subjectDate = subjectDate;
	}

	public String getSubjectState() {
		return subjectState;
	}

	public void setSubjectState(String subjectState) {
		this.subjectState = subjectState;
	}

	public byte[] getSubjectContentByte() {
		return subjectContentByte;
	}

	public void setSubjectContentByte(byte[] subjectContentByte) {
		this.subjectContentByte = subjectContentByte;
	}

	public String getSubjectLink() {
		if(null == subjectLink || "".equals(subjectLink)) {
			subjectLink = "subjectDetail.jsp?subjectId=" + this.getSubjectId();
		} else {
			if(subjectLink.indexOf("subjectDetail.jsp?url=") == -1 && subjectLink.indexOf("subjectDetail.jsp?subjectId=") == -1) {
				subjectLink = "subjectDetail.jsp?url=" + subjectLink;
			}
		}
		return subjectLink;
	}

	public void setSubjectLink(String subjectLink) {
		this.subjectLink = subjectLink;
	}

	public String getFlag() {
		return flag;
	}

	public void setFlag(String flag) {
		this.flag = flag;
	}

	public String getModifyDate() {
		return modifyDate;
	}

	public String getModifyUserName() {
		if (null == modifyUserName) {
			modifyUserName = "";
		}
		return modifyUserName;
	}

	public void setModifyUserName(String modifyUserName) {
		this.modifyUserName = modifyUserName;
	}

	public void setModifyDate(String modifyDate) {
		this.modifyDate = modifyDate;
	}

	public String getKnowDingding() {
		return knowDingding;
	}

	public void setKnowDingding(String knowDingding) {
		this.knowDingding = knowDingding;
	}
}
